home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / PROGEDIT / 0773.ZIP / BRIEF.DOC < prev    next >
Text File  |  1987-12-19  |  12KB  |  331 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.          SE A Compact, Easy-to-Use, Portable Screen Editor
  7.  
  8.  
  9.                 J. A. Pickering,
  10.                 Department of Electronics and Computer Science,
  11.                 Southampton University, UK.
  12.  
  13.  
  14.  
  15.  
  16.  
  17.          Background
  18.  
  19.          The single most heavily used software tool in a general
  20.          purpose computing environment is the program text editor.
  21.          More time is spent using an editor than perhaps any other
  22.          interactive computing tool.  Learning to use one is the next
  23.          most essential skill required beyond logging on and
  24.          displaying a few files.
  25.  
  26.          With the increasing number of computer systems that are
  27.          accessible to the average user today, it is becoming
  28.          important that there is an editor with the same interface
  29.          available on each machine.  This is particularly true in a
  30.          University environment where both staff and students
  31.          regularly migrate between machines on an hour to hour, day to
  32.          day basis.  The freedom to use the most suitable machine for
  33.          a particular task should not be hindered by the requirement
  34.          to learn how to use yet another text editor.  This common
  35.          problem has not been met with many economically attractive
  36.          solutions.
  37.  
  38.          The most well known portable editor is EMACS and its reduced
  39.          version for PCs, microEMACS, which are both available in
  40.          source in the Public Domain.  microEMACS is small enough to
  41.          provide a solution though, perhaps, not the best one.
  42.  
  43.  
  44.          Overview of SE
  45.  
  46.          SE is a screen editor for programs and text files.  SE is not
  47.          a traditional 'word processor' type editor as it makes no
  48.          attempt at automatically adjusting layout.
  49.  
  50.          The major features of the SE Screen Editor are:
  51.  
  52.              - free cursor movement (natural with a mouse),
  53.              - streamlined, consistent user interface,
  54.              - insert/overtype editing modes,
  55.              - windowing for long lines,
  56.              - block move/copy,
  57.              - file merging,
  58.              - auto-indent option,
  59.              - word wrapping option,
  60.              - user defined tab increment,
  61.              - string search including 'bracket' matching,
  62.              - bar line and 'approximate' numbers for easy navigation,
  63.              - large file support through 'folding',
  64.  
  65.                                       1
  66.  
  67.  
  68.          SE A Compact, Easy-to-Use, Portable Screen Editor
  69.  
  70.  
  71.  
  72.              - keyboard macro facility,
  73.              - placeholder facility,
  74.              - browse mode,
  75.              - shelling to host command environment,
  76.              - highly portable and available in source.
  77.  
  78.          SE is designed to be highly portable and thus be the editor
  79.          that every machine has available.  It is written in C and is
  80.          small enough for there to be little excuse for not porting it
  81.          to new environments.  The interface to the user is as uniform
  82.          as the host hardware permits and consistent, making SE really
  83.          easy to use in all its implementations.  SE will never claim
  84.          to be the 'best' editor in the world but it may be the
  85.          sleekest and should well serve the needs of migratory users
  86.          of computer systems.  SE may well be useful to those in MMI
  87.          research since its behaviour can be subtly altered and the
  88.          code easily instrumented to measure users' performance.
  89.  
  90.  
  91.          Design and Philosophy of SE
  92.  
  93.          For a beginning user a program must be 'forgiving' and
  94.          support experimentation without undue penalty.  It should
  95.          also provide sufficient feedback to develop the user's
  96.          confidence.  The commands must appeal to the user's existing
  97.          or 'world' knowledge of how similar programs or functions
  98.          behave to minimise the amount of re-learning required.  This
  99.          is also particularly important to experienced computer users
  100.          who are, perhaps, the most demanding and impatient naive
  101.          users of programs.
  102.  
  103.          The user interface requirements of both populations can be
  104.          met by having economical, simple models and a 'regular' set
  105.          of operations which provide the necessary functionality.  In
  106.          SE there are a small number of screen-editing functions which
  107.          perform the text and cursor movement operations.  These same
  108.          functions are used in a semantically consistent way to
  109.          provide a richer set of commands available in command mode.
  110.          This is achieved by allowing an argument to be prefixed to
  111.          the command in this mode which simply augments its normal
  112.          operation.  The attraction of a small number of commands is
  113.          that it reduces learning time and task planning effort and
  114.          speeds skill acquisition.  Most of the time users only
  115.          exercise a small sub-set of the command repertoires of
  116.          complex systems, even if they know that (somehow, somewhere)
  117.          there is 'better' way of performing a specific task.  SE
  118.          takes the approach that the correct way is the only way and
  119.          the one that comes most naturally and easily.
  120.  
  121.          Maintaining the dialogue between user and machine means
  122.          making sure that the user is always kept informed about what
  123.          is happening.  It was a design objective that SE should
  124.          always provide further user feedback each second even if it
  125.          is only some form of status report.  The user may also
  126.          interrupt lengthy or 'dangerous' operations so that the cost
  127.          of making errors is kept low and the user feels that he is
  128.          always in control.  Continuous feedback is also given on the
  129.          dynamically changeable modes since these change often and
  130.  
  131.                                       2
  132.  
  133.  
  134.          SE A Compact, Easy-to-Use, Portable Screen Editor
  135.  
  136.  
  137.  
  138.          their state can be easily forgotten, leading to slips.
  139.  
  140.          Users still like 'hard copy' output.  Indeed almost
  141.          everything that is edited eventually ends up on paper in some
  142.          form or other.  However, an editor does not afford the same
  143.          navigational freedom around a text compared with browsing or
  144.          flicking through a paper copy.  The display window provides a
  145.          small 'port hole' view and cannot be moved around freely,
  146.          even with sophisticated windowing systems.  As far as
  147.          possible analogues of indexing through a listing are
  148.          provided, such as a bar line position indicator and a place
  149.          holder.
  150.  
  151.          Man is notoriously bad at counting and invented computers to
  152.          help with such tasks.  Many editors still demand that a user
  153.          qualify commands with accurate numerical arguments.  SE
  154.          accepts a wide range of abbreviated 'approximate' numbers in
  155.          its commands as an alternative to exact values.
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.                          Table 1. Key function summary
  181.  
  182.  
  183.  
  184.          The command set adopted is illustrated in Table 1.  Basic use
  185.          of the editor can be achieved using the commands in screen
  186.          editing mode, all of them being available on function keys
  187.          (as shown in Figure 1 for a VT100-type terminal, similar for
  188.          PCs).  All the commands can be prefixed with a parameter in a
  189.          command mode thus yielding an ancilliary set with related
  190.          behaviour.  A small group of additional commands is available
  191.          in command mode.  They introduce themselves naturally since
  192.          some are essential to leaving SE.  These commands are given
  193.          in Table 2.
  194.  
  195.          EMACS and microEMACS have a 'toolset' approach to program
  196.  
  197.                                       3
  198.  
  199.  
  200.          SE A Compact, Easy-to-Use, Portable Screen Editor
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.                   Figure 1. VT100-type function keypad layout
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.                        Table 2. Simple commands summary
  244.  
  245.  
  246.          editing in which the fundamental internal operations provided
  247.          can bound to function keys or grouped and the group (macro)
  248.          bound to a key.  The operational model and range of functions
  249.          is considerably more complex, even in microEMACS.  The
  250.          default key bindings, found in most implementations, are not
  251.          very easy to learn as there are very few general
  252.          relationships amongst the wide range of functions.
  253.  
  254.          SE can be thus termed a 'Reduced Instruction Set' editor,
  255.          following the RISC ethos, with all the consequent advantages
  256.          (regularity) and disadvantages (too simple) attached to this
  257.          approach.  At least one of the benefits is that SE is small
  258.          and easy to port.  There is little excuse for it not to be
  259.          available on a machine, even though it never likely to be as
  260.          'good' as the native editor.
  261.  
  262.  
  263.                                       4
  264.  
  265.  
  266.          SE A Compact, Easy-to-Use, Portable Screen Editor
  267.  
  268.  
  269.  
  270.          Features
  271.  
  272.          One of the novel features of SE is the mechanism it uses to
  273.          support large texts.  The concept of 'folding', popularised
  274.          by INMOS in their Transputer development system suite, is an
  275.          old one but not directly supported by many editors.  SE uses
  276.          folding in preference to a 'virtual' text buffer so as
  277.          actively to encourage modular software or document
  278.          preparation.  Almost all modern programming languages and
  279.          text processing tools support hierarchical organisation of
  280.          source texts.  Some form of 'include' directive specifies a
  281.          filename argument for the lower order component.  In SE, if
  282.          the cursor is moved to this part of the 'fold' point, the
  283.          command SE in command mode spawns a new incarnation using the
  284.          filename at the cursor as the file parameter.  The parent SE
  285.          is suspended awaiting the completion of the sibling fold
  286.          edit(s).  An initially large text can be folded up by SE
  287.          using this technique and 'filling' mode to fill progressively
  288.          each fold with text.
  289.  
  290.          Auto-word-wrap and auto-indent are also featured together
  291.          with 'bracket matching' type searches.  Repetitive edits can
  292.          be performed using a keyboard macro facility which is also
  293.          used, in combination with the string search, to perform
  294.          string substitution.
  295.  
  296.          The 'quarter plane' display model is employed, allowing
  297.          complete freedom of movement of the cursor within the display
  298.          window bounds.  This is the only applicable method when
  299.          cursor commands are generated using a mouse.
  300.  
  301.  
  302.          Current status
  303.  
  304.          The full implementation of SE is available in C for UNIX and
  305.          MSDOS and several other similar operating systems and
  306.          machines+.  (A version in BCPL also exists.)  The
  307.          implementations are in heavy use by students on their
  308.          programming courses and by staff.
  309.  
  310.          One of the meanings of the acronym SE is 'simple editor' and
  311.          the pressure to introduce more functions was resisted unless
  312.          they could be fitted neatly into the existing command
  313.          framework and philosophy.  The resulting commented C source
  314.          thus amounts to 125kbytes and has been written specifically
  315.          to ease porting; only an isolated 45kbytes contains any
  316.          machine or compiler dependencies.  The program size is
  317.          30kbytes under MSDOS and about 50kbytes on a 68000-based UNIX
  318.          machine.
  319.  
  320.  
  321.  
  322.  
  323.                                      
  324.          + The binaries for SE are in the Public Domain.  The C source
  325.          and full Reference Manual and Tutorial are available from
  326.          Grey Matter, 4 Prigg Meadow, Ashburton, Devon TQ13 7DF, UK.
  327.          Tel:  +44 (0)364 53499.
  328.  
  329.                                       5
  330.  
  331.